//admin testing
$(function(){
	admin_testing.run();
});

var admin_testing = {
		run: function(){
			this._init_();
			this._start_();
			this._init_events();			
		},
		
		_init_: function(){
			this.contextPath = $("#contextPath").val() || "";
		},
		
		_start_: function(){			
		},
		
		_init_events: function(){
			$("#reqBtn").click(function(){
				admin_testing._handle_request();
			});
		},
		
		_handle_request: function(){
			var url = this.contextPath + "/admin/testing/requestapi";
			var data = $("#requestForm").serialize();
			$.post(url, data, function(result){
				$("#result_div").html(result);
				
			});
		}
};